//提示文字
var oContainer = document.querySelector(".container");
var oInput01 = document.getElementsByClassName("input-text")[0];
var oInput01Desc = document.querySelector(".input-text-desc");
myAddEvent(oInput01, 'blur', function () {
    // console.log('aaa');
    if (!this.value) {
        oInput01Desc.style.display = "block";
    }
})

var oInput02 = document.getElementsByClassName("input-text")[1];
var oInput02Desc = document.querySelector(".form2 .input-text-desc");
myAddEvent(oInput02, 'blur', function () {
    // console.log('aaa');
    if (!this.value) {
        oInput02Desc.style.display = "block";
    }
})

var oInput03 = document.querySelector(".input-cptcha");
var oInput03Desc = document.querySelector(".input-cptcha-desc2");
myAddEvent(oInput03, 'blur', function () {
    // console.log(oInput03Desc.innerHTML);
    if (!this.value) {
        oInput03Desc.style.display = "block";
    }
})

var oInput04 = document.querySelector(".input-phone");
var oInput04Desc = document.querySelector(".input-phone-desc3");
myAddEvent(oInput04, 'blur', function () {
    // console.log(oInput04Desc.innerHTML);
    if (!this.value) {
        oInput04Desc.style.display = "block";
    }
})

//表单切换功能
var oLoginMethod01 = document.querySelector(".login-method01");
var oLoginMethod02 = document.querySelector(".login-method02");
var oForm1 = document.querySelector(".form1");
var oForm2 = document.querySelector(".form2");
var oTabA = document.querySelectorAll(".nav-tab li a");

myAddEvent(oLoginMethod02, 'click', function () {
    // console.log('222');
    for (var i = 0;i < oTabA.length;i++) {
        oTabA[i].style.color = "#333";
        this.style.color = "#e8380d";
    }
    
    oContainer.style.height = "480px";
    oForm1.style.display = "none";
    oForm2.style.display = "block";
});
myAddEvent(oLoginMethod01, 'click', function () {
    // console.log('111');
    for (var i = 0;i < oTabA.length;i++) {
        oTabA[i].style.color = "#333";
        this.style.color = "#e8380d";
    }
    oContainer.style.height = "393px";
    oForm1.style.display = "block";
    oForm2.style.display = "none";
})